package JavaEE_notes.common_API.Thread.pojo;

/**
 * @author TaiZai
 * @data 2024/9/24 11:52
 */
public class MyRunnable implements Runnable {
    @Override
    public void run() {
//        for (int i = 0; i < 5; i++) {
//            System.out.println("子线程MyRunnable输出--" + i);
//        }
        System.out.println(Thread.currentThread().getName() + " 执行 MyRunnable");
        try {
            // 使得线程休眠时间变成模拟一直在执行
            Thread.sleep(1000);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
